package com.marlon.auto.entity.po;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.time.LocalDateTime;


/**
 * <p>
 *
 * </p>
 *
 * @author marlon
 * @since 2022-04-19
 */
@Data
@EqualsAndHashCode()
@Accessors(chain = true)
@Entity
@Table(name = "soa_area_info")
public class AreaInfoPO {

    /**
     * 区域主键
     */
    @Id
    @Column(name = "AREA_ID", length = 50)
    @GeneratedValue(generator = "idGenerator")
    @GenericGenerator(name = "idGenerator", strategy = "com.marlon.auto.util.IdGenerator", parameters = {
            @org.hibernate.annotations.Parameter(name = "prefix", value = "area")})
    private String areaId;
    /**
     * 可用状态：1-可用，0-不可用
     */
    @Column(name = "AVAIL_STATE", length = 1)
    private String availState;
    /**
     * 区域名称
     */
    @Column(name = "AREA_NAME", length = 128)
    private String areaName;
    /**
     * 区域类型：1-总行，2-分行
     */
    @Column(name = "AREA_TYPE", length = 1)
    private String areaType;
    /**
     * 区域描述
     */
    @Column(name = "AREA_DESC", length = 1024)
    private String areaDesc;
    /**
     * 创建时间
     */
    @Column(name = "CRT_TIME")
    private LocalDateTime crtTime;
    /**
     * 上级区域
     */
    @Column(name = "PARENT_AREA_ID", length = 50)
    private String parentAreaId;

}